* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.add-task-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.add-task-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.add-task-form input, .add-task-form select, .add-task-form button {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.add-task-form input {
    flex: 1;
    min-width: 200px;
}

.add-task-form select {
    min-width: 150px;
}

.add-task-form button {
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.add-task-form button:hover {
    background: #0056b3;
}

.view-settings {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #555;
}

.focus-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: inherit;
    position: relative;
}

.focus-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.focus-switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.focus-switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.focus-switch input:checked + .focus-switch-slider {
    background: #007bff;
}

.focus-switch input:checked + .focus-switch-slider::after {
    transform: translateX(20px);
}

.focus-switch-text {
    font-weight: 500;
}

.quadrants {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.quadrant {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.quadrants.focus-enabled {
    transition: grid-template-columns 0.35s ease, grid-template-rows 0.35s ease;
    position: relative;
}

.quadrants.focus-enabled .quadrant {
    transition: box-shadow 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.quadrants.focus-enabled .quadrant.focus-active {
    z-index: 3;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    filter: none;
}

.quadrants.focus-enabled .quadrant.focus-inactive {
    opacity: 0.72;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    filter: saturate(0.85) brightness(0.95);
}

.quadrants.focus-enabled:not([data-active-quadrant]) .quadrant {
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    filter: none;
}

.quadrants.focus-enabled[data-active-quadrant="urgent-important"],
.quadrants.focus-enabled[data-active-quadrant="important-not-urgent"] {
    grid-template-rows: 1.65fr 0.35fr;
}

.quadrants.focus-enabled[data-active-quadrant="not-important-urgent"],
.quadrants.focus-enabled[data-active-quadrant="not-important-not-urgent"] {
    grid-template-rows: 0.35fr 1.65fr;
}

.quadrants.focus-enabled[data-active-quadrant="urgent-important"],
.quadrants.focus-enabled[data-active-quadrant="not-important-urgent"] {
    grid-template-columns: 1.65fr 0.35fr;
}

.quadrants.focus-enabled[data-active-quadrant="important-not-urgent"],
.quadrants.focus-enabled[data-active-quadrant="not-important-not-urgent"] {
    grid-template-columns: 0.35fr 1.65fr;
}

.quadrants.focus-enabled.focus-suspended {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.quadrants.focus-enabled.focus-suspended .quadrant {
    transform: none;
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quadrant h2 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    font-size: 1.1em;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

/* 象限标题头部容器 */
.quadrant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    flex-shrink: 0;
}

.quadrant-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    flex: 1;
}

.quadrant-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quadrant-filter-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.quadrant-filter-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.quadrant-filter-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

.quadrant-filter-btn.active {
    background: #475569;
    color: #fff;
    border-color: #475569;
    box-shadow: 0 3px 12px rgba(71, 85, 105, 0.35);
}

.quadrant.urgent-important .quadrant-filter-btn.active {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.35);
}

.quadrant.important-not-urgent .quadrant-filter-btn.active {
    background: #28a745;
    border-color: #28a745;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.35);
}

.quadrant.not-important-urgent .quadrant-filter-btn.active {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.5);
}

.quadrant.not-important-not-urgent .quadrant-filter-btn.active {
    background: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 3px 12px rgba(108, 117, 125, 0.35);
}

.quadrant-filter-group {
    display: flex;
    gap: 6px;
    margin-right: 4px;
}

.quadrant-expand-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.quadrant-expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

.quadrant.urgent-important .quadrant-expand-btn {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
}

.quadrant.important-not-urgent .quadrant-expand-btn {
    background: rgba(134, 239, 172, 0.2);
    color: #047857;
}

.quadrant.not-important-urgent .quadrant-expand-btn {
    background: rgba(251, 191, 36, 0.2);
    color: #b45309;
}

.quadrant.not-important-not-urgent .quadrant-expand-btn {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

/* 快捷新增按钮基础样式 */
.quick-add-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    margin-left: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.quick-add-btn:hover {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.quick-add-btn:active {
    transform: scale(1.1);
    transition: all 0.1s ease;
}

/* 添加按钮点击波纹效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.quick-add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quick-add-btn:active::before {
    width: 300%;
    height: 300%;
    transition: 0s;
}

.drop-zone {
    flex: 1;
    overflow-y: auto;
    min-height: 50px;
    border: 2px dashed transparent;
    border-radius: 5px;
    transition: all 0.3s;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-content: flex-start;
    padding: 16px 8px;
    margin: 0;
    box-sizing: border-box;
}

.drop-zone::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.drop-zone.drag-over {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.drop-zone.drag-disabled {
    background: rgba(241, 245, 249, 0.65);
}

.drop-zone.drag-disabled .task {
    cursor: default;
}

/* 确保拖拽区域状态完全重置 */
.drop-zone:not(.drag-over) {
    border: 2px dashed transparent !important;
    background: transparent !important;
}

/* 拖拽结束后的状态清理 */
.drop-zone.drag-cleanup {
    border: 2px dashed transparent !important;
    background: transparent !important;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .container {
        height: calc(100vh - 16px);
    }
    
    .quadrants {
        gap: 8px;
    }
    
    .quadrant {
        padding: 10px;
    }
    
    .quadrant h2 {
        font-size: 1em;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    .quadrant-header h2 {
        font-size: 1em;
    }
    
    .quick-add-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .task {
        padding: 8px;
        margin-bottom: 6px;
        font-size: 12px;
    }
    
    .add-task-form {
        flex-direction: column;
    }
    
    .add-task-form input, .add-task-form select, .add-task-form button {
        width: 100%;
    }
    
    /* 移动端按钮位置调整 */
    .export-task-trigger {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 90px;
    }
    
    .export-task-trigger.repositioned {
        bottom: 100px; /* 移动端向上移动 */
        right: 20px;   /* 距离右边缘更近 */
    }
    
    .add-task-trigger {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

.quadrant.urgent-important h2 {
    border-color: #dc3545;
    color: #dc3545;
}

.quadrant.urgent-important .quadrant-header {
    border-color: #dc3545;
}

.quadrant.urgent-important .quadrant-header h2 {
    color: #dc3545;
}

.quadrant.urgent-important .quick-add-btn {
    background: #dc3545;
    color: white;
}

.quadrant.urgent-important .quick-add-btn:hover {
    background: #c82333;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5);
    transform: scale(1.2);
}

.quadrant.important-not-urgent h2 {
    border-color: #28a745;
    color: #28a745;
}

.quadrant.important-not-urgent .quadrant-header {
    border-color: #28a745;
}

.quadrant.important-not-urgent .quadrant-header h2 {
    color: #28a745;
}

.quadrant.important-not-urgent .quick-add-btn {
    background: #28a745;
    color: white;
}

.quadrant.important-not-urgent .quick-add-btn:hover {
    background: #218838;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.5);
    transform: scale(1.2);
}

.quadrant.not-important-urgent h2 {
    border-color: #ffc107;
    color: #ffc107;
}

.quadrant.not-important-urgent .quadrant-header {
    border-color: #ffc107;
}

.quadrant.not-important-urgent .quadrant-header h2 {
    color: #ffc107;
}

.quadrant.not-important-urgent .quick-add-btn {
    background: #ffc107;
    color: #212529;
}

.quadrant.not-important-urgent .quick-add-btn:hover {
    background: #e0a800;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.5);
    transform: scale(1.2);
}

.quadrant.not-important-not-urgent h2 {
    border-color: #6c757d;
    color: #6c757d;
}

.quadrant.not-important-not-urgent .quadrant-header {
    border-color: #6c757d;
}

.quadrant.not-important-not-urgent .quadrant-header h2 {
    color: #6c757d;
}

.quadrant.not-important-not-urgent .quick-add-btn {
    background: #6c757d;
    color: white;
}

.quadrant.not-important-not-urgent .quick-add-btn:hover {
    background: #545b62;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.5);
    transform: scale(1.2);
}

.task {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px;
    cursor: move;
    transition: all 0.25s ease;
    font-size: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    outline: none !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.task.drag-disabled {
    cursor: default;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.task.drag-disabled:hover {
    transform: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.task:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.task.dragging {
    opacity: 0.45;
    transform: scale(0.98);
    transition: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.task-title {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.task-status {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.task-status.pending {
    background: rgba(148, 163, 184, 0.22);
    color: #475569;
}

.task-status.completed {
    background: rgba(203, 213, 225, 0.35);
    color: #64748b;
}

.task-body {
    color: #475569;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
}

.task-meta-value {
    font-size: 12px;
    color: #475569;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.task-actions button {
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: #f1f5f9;
    color: #475569;
}

.task-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(148, 163, 184, 0.25);
}

.task-actions .complete-btn {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.task-actions .complete-btn:hover {
    background: rgba(148, 163, 184, 0.3);
    color: #1f2937;
}

.task-actions .delete-btn {
    background: rgba(241, 245, 249, 0.7);
    color: #475569;
}

.task-actions .delete-btn:hover {
    background: rgba(226, 232, 240, 0.9);
    color: #1f2937;
}

.task.completed {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: none;
    background: #f8fafc;
}

.task.completed .task-title {
    color: #9ca3af;
    text-decoration: line-through;
}

.task.completed .task-body {
    color: #94a3b8;
}

.task.completed .task-meta-value {
    color: #94a3b8;
}


/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-title {
    font-size: 1.5em;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stay-open-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.stay-open-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.stay-open-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #007bff;
}

.stay-open-toggle span {
    margin: 0;
}

.toast-container {
    position: fixed;
    left: 50%;
    top: 25vh;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast-message {
    padding: 12px 18px;
    background: rgba(34, 34, 34, 0.92);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    letter-spacing: 0.2px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-group label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.modal-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 80px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.add-task-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    transition: all 0.3s;
    z-index: 100;
}

.add-task-trigger:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* 隐藏新增按钮的样式 */
.add-task-trigger.hidden {
    display: none !important;
}

/* 导出任务按钮样式 */
.export-task-trigger {
    position: fixed;
    bottom: 30px;
    right: 110px; /* 位于添加按钮左侧 */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
    transition: all 0.3s;
    z-index: 100;
}

.export-task-trigger:hover {
    background: #218838;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* 导出按钮重新定位样式 */
.export-task-trigger.repositioned {
    bottom: 120px; /* 向上移动 */
    right: 30px;   /* 贴右边缘 */
}

/* 全页显示模态窗口样式 */
.fullscreen-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.fullscreen-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fullscreen-modal {
    background: white;
    border-radius: 0;
    width: 100%;
    height: 100%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.fullscreen-modal-overlay.show .fullscreen-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fullscreen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.fullscreen-modal-title {
    font-size: 1.6rem;
    color: #334155;
    margin: 0;
    font-weight: 600;
    transition: color 0.25s ease;
}

.fullscreen-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    padding: 8px;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fullscreen-modal-close:hover {
    background: #f1f5f9;
    color: #1f2937;
    transform: scale(1.05);
}

.fullscreen-modal-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.fullscreen-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 20px;
    max-height: 100%;
    overflow-y: auto;
}

.fullscreen-tasks.fullscreen-task-layout {
    background: rgba(241, 245, 249, 0.35);
    border-radius: 18px;
}

.fullscreen-tasks.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
}

.fullscreen-task-card {
    cursor: move;
}

.fullscreen-filter-info {
    grid-column: 1 / -1;
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9em;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
    margin-bottom: 4px;
}

.quadrant h2 {
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.quadrant h2:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.empty-fullscreen-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 20px;
    }
    
    .add-task-trigger {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .export-task-trigger {
        bottom: 20px;
        right: 80px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fullscreen-modal {
        width: 100%;
        height: 100%;
    }
    
    .fullscreen-modal-header {
        padding: 16px 20px;
    }
    
    .fullscreen-modal-title {
        font-size: 1.4rem;
    }
    
    .fullscreen-modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .fullscreen-modal-content {
        padding: 16px 20px;
    }
    
    .fullscreen-tasks {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fullscreen-task {
        padding: 15px;
    }
    
    .fullscreen-task-title {
        font-size: 1.1em;
    }
    
    /* 导出模态窗口的移动端适配 */
    .export-modal {
        width: 98% !important;
        max-width: none !important;
        margin: 10px;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .export-modal-content {
        flex-direction: column;
    }
    
    .export-config-section {
        margin-bottom: 20px;
    }
    
    .export-preview-section {
        max-height: 200px;
    }
}

/* SortableJS 样式增强 */
.sortable-ghost {
    opacity: 0.3 !important;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%) !important;
    border: 2px dashed #ccc !important;
    transform: scale(1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    /* 防止ghost元素显示蓝色边框 */
    outline: none !important;
}

.sortable-chosen {
    transform: scale(1) !important;
    z-index: 1000 !important;
    /* 防止chosen元素显示蓝色边框 */
    outline: none !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    border: 2px solid rgba(148, 163, 184, 0.4) !important;
}

.sortable-drag {
    transform: scale(0.98) !important;
    opacity: 0.8 !important;
    /* 防止drag元素显示蓝色边框 */
    outline: none !important;
}

/* 拖拽时的样式优化增强 */
.task {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: grab;
    /* 防止focus引起的蓝色边框 */
    outline: none !important;
}

.task:focus {
    /* 完全禁用focus样式 */
    outline: none !important;
    box-shadow: none !important;
    border-color: #e9ecef !important;
}

.task:active {
    cursor: grabbing;
    /* 防止active状态的蓝色边框 */
    outline: none !important;
}

.task.sortable-chosen {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    border: 2px solid rgba(148, 163, 184, 0.4);
    /* 防止chosen状态的额外边框 */
    outline: none !important;
}

/* 全局拖拽状态样式 */
body.dragging-active {
    cursor: grabbing !important;
}

body.dragging-active * {
    /* 拖拽时禁用文本选择 */
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 拖拽状态清理动画 */
@keyframes dragStateCleanup {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.drag-cleanup-animation {
    animation: dragStateCleanup 0.3s ease;
}

/* 导出模态窗口样式 */
.export-modal {
    max-width: 1000px !important;
    width: 90% !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.export-modal-content {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.export-config-section {
    flex: 1;
    min-width: 300px;
}

.export-preview-section {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

.export-preview-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
}

.preview-container {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.export-preview {
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    background: white;
    border: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 复选框样式 */
.quadrant-checkboxes,
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    user-select: none;
}

.checkbox-item:hover {
    background-color: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::before {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 象限类型的颜色区分 */
.checkbox-item.urgent-important:hover {
    background-color: #ffeaea;
}

.checkbox-item.urgent-important input[type="checkbox"]:checked + .checkmark {
    background-color: #dc3545;
    border-color: #dc3545;
}

.checkbox-item.important-not-urgent:hover {
    background-color: #eafaf1;
}

.checkbox-item.important-not-urgent input[type="checkbox"]:checked + .checkmark {
    background-color: #28a745;
    border-color: #28a745;
}

.checkbox-item.not-important-urgent:hover {
    background-color: #fffaef;
}

.checkbox-item.not-important-urgent input[type="checkbox"]:checked + .checkmark {
    background-color: #ffc107;
    border-color: #ffc107;
}

.checkbox-item.not-important-not-urgent:hover {
    background-color: #f8f9fa;
}

.checkbox-item.not-important-not-urgent input[type="checkbox"]:checked + .checkmark {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* 导出成功通知动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.export-success-notification {
    animation: slideInRight 0.3s ease;
}

.export-success-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-success-notification .notification-icon {
    font-size: 18px;
}

.export-success-notification .notification-text {
    font-weight: 500;
}

/* 全屏模式拖拽样式增强 */
.fullscreen-sortable-ghost {
    opacity: 0.3 !important;
    background: linear-gradient(135deg, 
        rgba(227, 242, 253, 0.9) 0%, 
        rgba(187, 222, 251, 0.8) 50%, 
        rgba(144, 202, 249, 0.7) 100%) !important;
    border: 2px dashed #2196f3 !important;
    transform: rotate(2deg) !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(4px);
    /* 防止ghost状态的蓝色边框 */
    outline: none !important;
}

.fullscreen-sortable-chosen {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
    border: 2px solid #007bff !important;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 255, 0.9) 50%, 
        rgba(232, 244, 253, 0.85) 100%) !important;
    backdrop-filter: blur(8px);
    /* 防止chosen状态的额外边框 */
    outline: none !important;
}

.fullscreen-sortable-drag {
    opacity: 0.8 !important;
    transform: rotate(-2deg) scale(0.98) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    /* 防止drag状态的蓝色边框 */
    outline: none !important;
}

/* 拖拽激活状态 */
.fullscreen-tasks.drag-active {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f4fd 100%);
    border: 2px dashed #2196f3;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.fullscreen-tasks.drag-active::before {
    content: '💡 拖拽任务可以重新排序';
    display: block;
    text-align: center;
    color: #2196f3;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

/* 全屏任务可拖拽状态 */
.fullscreen-task {
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.fullscreen-task:active {
    cursor: grabbing;
}

.fullscreen-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

/* 拖拽动画效果 */
@keyframes dragPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.fullscreen-sortable-chosen {
    animation: dragPulse 1.5s infinite;
}

/* 拖拽指示器 */
.fullscreen-tasks .fullscreen-task:not(.fullscreen-sortable-chosen):not(.fullscreen-sortable-ghost) {
    position: relative;
}

.fullscreen-tasks.drag-active .fullscreen-task:not(.fullscreen-sortable-chosen):not(.fullscreen-sortable-ghost)::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px dashed transparent;
    border-radius: 12px;
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.fullscreen-tasks.drag-active .fullscreen-task:not(.fullscreen-sortable-chosen):not(.fullscreen-sortable-ghost):hover::after {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

/* 响应式拖拽样式 */
@media (max-width: 768px) {
    .fullscreen-sortable-chosen {
        transform: scale(1.03);
    }
    
    .fullscreen-sortable-drag {
        transform: rotate(-1deg) scale(0.99);
    }
    
    .fullscreen-tasks.drag-active::before {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

/* 拖拽时禁用文本选择 */
.fullscreen-tasks.drag-active * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 全局拖拽状态增强 */
body.fullscreen-dragging-active {
    cursor: grabbing !important;
}

body.fullscreen-dragging-active * {
    /* 全屏拖拽时禁用文本选择 */
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 拖拽状态完全清理样式 */
.drag-state-clean {
    /* 强制重置所有可能的拖拽样式 */
    opacity: 1 !important;
    transform: none !important;
    background: initial !important;
    border: initial !important;
    box-shadow: initial !important;
    outline: none !important;
    cursor: initial !important;
    z-index: initial !important;
    backdrop-filter: none !important;
}

/* 防止任何元素在拖拽后保持蓝色边框 */
*:not(input):not(textarea):not(select):focus {
    outline: none !important;
}

/* 特殊情况下的强制清理 */
.force-clean-drag-state * {
    opacity: 1 !important;
    transform: none !important;
    background: initial !important;
    border: initial !important;
    box-shadow: initial !important;
    outline: none !important;
    cursor: initial !important;
    z-index: initial !important;
    backdrop-filter: none !important;
    transition: all 0.2s ease !important;
}
.fullscreen-modal[data-quadrant="urgent-important"] .fullscreen-modal-title {
    color: #dc3545;
}

.fullscreen-modal[data-quadrant="important-not-urgent"] .fullscreen-modal-title {
    color: #28a745;
}

.fullscreen-modal[data-quadrant="not-important-urgent"] .fullscreen-modal-title {
    color: #ffc107;
}

.fullscreen-modal[data-quadrant="not-important-not-urgent"] .fullscreen-modal-title {
    color: #6c757d;
}
